function createRequestObject(){
    var req;
    if(window.XMLHttpRequest){
        //For Firefox, Safari, Opera
        req = new XMLHttpRequest();
    }
    else if(window.ActiveXObject){
        //For IE 5+
        req = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else{
        //Error for an old browser
        alert('Your browser is not IE 5 or higher, or Firefox or Safari or Opera');
    }
    return req;
}
 
function ajaxfunction(pagename){
    if(http){
        http.open("GET", pagename ,true);
        http.onreadystatechange = handleResponse;
        http.send(null);
    }
}

function handleResponse(){
    if(http.readyState == 4 && http.status == 200){
        var detail=document.getElementById("detail");
        detail.innerHTML=http.responseText;
        
        formatGeneralTable();
    }
}